<?php 

	function get_all_courses(){
		global $wpdb;	
		$prefix = "timetable_";
		$course_query = "SELECT idcourse course_id, course_name, course_basecost, course_totalcount FROM {$prefix}course";
		$arr_courses = $wpdb->get_results($course_query, ARRAY_A);
		return $arr_courses;	
	}


	function get_all_forms(){
		global $wpdb;	
		$prefix = "timetable_";
		$form_query = "SELECT idform form_id, form_name FROM {$prefix}form";
		$arr_forms = $wpdb->get_results($form_query, ARRAY_A);
		return $arr_forms;		
	}


	function get_all_teachers(){
		global $wpdb;	
		$prefix = "timetable_";
		$form_query = "SELECT idteacher teacher_id, teacher_name FROM {$prefix}teacher";
		$arr_teachers = $wpdb->get_results($form_query, ARRAY_A);
		return $arr_teachers;		
	}

?>